#include<stdio.h>
#include<string.h>
#include<stdlib.h>
class ReversedSum
{
public:
    int getReversedSum(int x, int y)
    {
    	/*
    	char a[4],b[4];
    	//itoa(x,a,10);
    	//itoa(y,b,10);
    	int j=1000;
    	int i=0,flag = 0;
    	while((int)j>0)
    	{
    		if(int(x/j)==0) {j/=10;continue;}
    		a[i++] = int(x/j);
    		j/=10;
    	}
    	i=0;j=1000;
    	while((int)j>0)
    	{
    		if(int(y/j) == 0) {j/=10;continue;}
    		b[i++] = int(y/j);
    		j/=10;
    	}
    	int lenx = strlen(a);
    	int leny = strlen(b);
    	char c[4]={0};
    	i=0;
    	while(i<lenx&&i<leny)
    	{
    		c[i]=a[i]+b[i]+flag;
    		if(c[i]>9)
    		{
    			flag = 1;
    			c[i]%=10;
    		}
    		else flag = 0;
    	}
    	if(lenx>leny)
    	{
    		for(;i<lenx;i++)
    			c[i]+=a[i];
    	}
    	else if(lenx<leny)
    	{
    		for(;i<leny;i++)
    			c[i]+=b[i];
    	}
    	int sum = atoi(c);
    	while(sum%10 == 0)
 		{
 			sum/=10;
 		}
 		return sum;*/
    int a,b,m,n;
    a = x;
    b = y;
    m = 0;
    n = 0;
    while(a>0)
    {
    	m = m*10 + a%10;
    	a/=10;
    }
    while(b>0)
    {
    	n = n*10 + b%10;
    	b/=10;
    }
    m += n;
    int sum = 0;
    while(m>0)
    {
    	sum = sum * 10 + m%10;
    	m/=10;
    }
    return sum;
    }
 };
